package com.tbvtc.agriculturalcreditchainserver2025.utils;

import lombok.Getter;

@Getter
public enum ResultCodeEnum {
    SUCCESS(200, "成功"),
    //   USERADNPASSWORDNOTNULL(201,"用户名或密码不能为空"),
    APP_LOGIN_PHONE_EMPTY(202, "手机号不能为空"),
    APP_SEND_SMS_TOO_OFTEN(504, "验证法发送过于频繁"),
    APP_REGISTER_PHONE_EXIST(505, "手机号已存在"),
    APP_LOGIN_CODE_ERROR(506, "验证码错误"),
    APP_LOGIN_PASSWORD_EMPTY(507, "密码不能为空"),
    APP_LOGIN_CODE_EMPTY(508, "验证码不能为空"),
    ADMIN_CAPTCHA_CODE_EXPIRED(509, "验证码已过期"),
    //删除失败
    ADMIN_DELETE_FAIL(510, "删除失败"),
    APP_LOGIN_PHONE_ERROR(511, "手机号或密码错误"),
    ADMIN_LOGIN_AUTH(512, "登录失败"),
    APP_ORDER_EXIST(513, "没有这个东西"),
    //蔬果还没有成熟请稍后
    APP_ORDER_NOT_MATURE(514, "农产品还没有成熟请稍后"),
    APP_CART_NOT_EXIST(515, "购物车中没有这个商品"),
    APP_CART_NUM_ERROR(516, "商品数量不能小于1"),
    TOKEN_EXPIRED(517, "token已过期"),
    TOKEN_INVALID(518, "token无效"),
    //    APP_CART_NUM_ERROR(519, "商品数量不能小于1")
    //当前状态不允许修改或订单不存在
    APP_ORDER_NOT_EXIST(520, "当前状态不允许修改或订单不存在"),
    //没有这个订单
    APP_ORDER_NOT_EXIST_ERROR(521, "没有这个订单"),
    //用户没有土地或者账户不存在
    APP_LAND_NOT_EXIST(522, "用户没有土地或者账户不存在"),
    //修改头像失败
    FAILE_MODIFY_PROFILE_POCTURE(523, "修改头像失败")
    //上链失败
    , FAILED_TO_CHAIN(524, "上链失败")
    //查询失败
    , FAILED_TO_QUERY(525, "查询失败")
    //上传失败
    , FAILED_TO_UPLOAD(526, "上传失败")
    //用户未认证
    , USER_NOT_AUTH(527, "用户未认证")
    //用户被禁用
    , USER_DISABLE(528, "用户被禁用")
    //上传图片失败
    , FAILED_TO_UPLOAD_PICTURE(529, "上传图片失败")
    //用户不存在
    , USER_NOT_EXIST(530, "用户不存在")
    //短信服务暂时不可用
    , SMS_SERVICE_UNAVAILABLE(531, "短信服务暂时不可用")
    //短信参数序列化失败
    , SMS_SERIALIZATION_FAILED(532, "短信参数序列化失败")
    //水泵执行错误
    , WATERPUMP_EXECUTION_ERROR(533, "水泵执行错误")
    //请求失败
    , REQUEST_FAILED(534, "请求失败"), FILE_EMPTY(534, "文件为空")
    , //文件为空
    FILE_NOT_FOUND(535, "文件未找到"),
    //用户已经注册
    USER_ALREADY_REGISTERED(536, "用户已经注册"),
    //购物车为空
    CART_EMPTY(537, "购物车为空"),

    CROP_IS_MATURE(538,"农作物已经成熟" );
    private final Integer code;
    private final String message;

    ResultCodeEnum(Integer code, String message) {
        this.code = code; // 初始化code和message
        this.message = message;
    }

}
